//
//  DiaryTableViewCell.m
//  kuimi
//
//  Created by guozhou-MAC001 on 15/9/16.
//  Copyright (c) 2015年 guozhou-MAC001. All rights reserved.
//

#import "DiaryTableViewCell.h"
#import "UIColor+CustomColors.h"
#import <POP/POP.h>
@implementation DiaryTableViewCell

- (void)awakeFromNib {
    // Initialization code
}
-(id)init{
    if ([super init]) {
        _cardView.layer.cornerRadius=8.0f;
        _dateView.layer.cornerRadius=8.0f;
    }
    return self;
}
- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated
{
    [super setHighlighted:highlighted animated:animated];
    if (self.highlighted) {
        POPBasicAnimation *scaleAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewScaleXY];
        scaleAnimation.duration = 10;
        scaleAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(0.2, 0.2)];
        [self.cardView pop_addAnimation:scaleAnimation forKey:@"scaleAnimation"];
    } else {
        POPSpringAnimation *scaleAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewScaleXY];
        scaleAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(1, 1)];
        scaleAnimation.velocity = [NSValue valueWithCGPoint:CGPointMake(8,8)];
        scaleAnimation.springBounciness = 15.f;
        [self.cardView pop_addAnimation:scaleAnimation forKey:@"scaleAnimation"];
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)BJ:(UIButton *)sender {
    if (self.disclosureBlock) self.disclosureBlock();
}
@end
